{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%run -n main.py\n",
    "!mkdir -p {DATA_DIR}\n",
    "\n",
    "s3 = S3()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "%run -n main.py\n",
    "if not exists(LENTA):\n",
    "    s3.download(S3_LENTA, LENTA)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# syntax"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# sudo docker run -it --rm --gpus all \\\n",
    "#     -p 8082:8080 \\\n",
    "#     -e SEQ_LEN=256 \\\n",
    "#     -e BATCH_SIZE=1024 \\\n",
    "#     natasha/slovnet-syntax-bert"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# %run -n main.py\n",
    "# records = load_lenta(LENTA)\n",
    "# records = log_progress(records, total=LENTA_TOTAL)\n",
    "# items = process_syntax(records)\n",
    "# lines = format_jl(items)\n",
    "# dump_gz_lines(lines, SYNTAX)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# s3.upload(SYNTAX, S3_SYNTAX)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
